(set_point): When moving over invis chars,
authorRichard M. Stallman <rms@gnu.org>
Tue, 15 Jun 1993 05:27:54 +0000 (05:27 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 15 Jun 1993 05:27:54 +0000 (05:27 +0000)
don't screw up at end of buffer.

src/intervals.c

index 7809c37505b71ab9ba32320d5ef7f5de36d67b74..e6254cbdf6ae6f362e600af29fee5b3de0bbe2df 100644 (file)
@@ -1315,7 +1315,10 @@ set_point (position, buffer)
     {
       toprev = to;
       to = next_interval (to);
-      position = to->position;
+      if (NULL_INTERVAL_P (to))
+       position = BUF_ZV (buffer);
+      else
+       position = to->position;
     }
 
   buffer->text.pt = position;